<?php
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->registerCssFile('/css/search/autocomplete.css');
$this->registerCssFile('/css/search/style.css');
$this->registerCssFile('/css/fenlei.css');

$this->registerCss('
    .wrapper{background:#ecebeb}
    .fenlei{background-color: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.09);}
    ');

$this->title = '尚好课-课程中心';
$this->registerMetaTag([
    'name' => 'keywords',
    'content' => 'IT课程,IT学习,产品经理,编程学习,android,ios,php,java,python,html5,cocos2dx,平面设计,交互设计'
]);
$this->registerMetaTag([
    'name' => 'description',
    'content' => '尚好课致力于网络课程共享,提供IT课程,电子商务,产品经理,平面设计,交互设计,UI设计,大数据云计算,JAVA,PHP,android开发,ios开发'
]);

?>

<div class="htmleaf-container">
	<hr />
	<form id='searchName' action='/course/index.html'>
		<div id='autocomplete' class="autocomplete-container">
			<input type="text" autocomplete="off" name="name" id='searchClass'
				placeholder="输入课程名" class="autocomplete-input"
				style="border-radius: 3px 0px 0px 3px;">
			<div class="autocomplete-button"
				onclick='jQuery("#searchName").submit()'>搜索</div>
		</div>
	</form>
	<div style='clear: both'></div>
</div>
<br>
<section class="container fenlei">
	<hr />
	<div style='text-align: center;'>
		<h1 class="">尚好课-课程分类</h1>
	</div>
	<hr />
	<div class="row active-with-click">
		<ul>
            <?php foreach($model as $val):?>
            <li class="col-md-3 col-sm-4 col-xs-6"><a
				href='<?=Url::to('/course/index.html?class='.$val['id'])?>'>
					<div class="mask"></div>
					<div class="mask-play"></div> <img src="<?=$val['logo']?>"
					alt="<?=$val['name']?>">
			</a>
				<p>
					<span class="title"><?=$val['name']?></span>
				</p></li>
            <?php endforeach;?>
        </ul>
	</div>
	<hr />
</section>
</div>